1. Field of the Invention
This invention relates generally to analog-to-digital converts and, more particularly, to using an analog-to-digital converter in a programmable trigger level comparison configuration.
2. Background of the Invention
In many important applications, the level of a signal should be constrained by predetermined values. For example, when the oil pressure in a motor rises above a certain level, a response is called for. That response can be a warning signal to the user or can be a more direct response involving the motor itself.
Referring to FIG. 1, the use of an analog-to-digital converter 15 to provide an activity upon a predetermined comparison with a voltage level is shown. A series of signals are applied to input terminals 11A-11N of a multiplexer 12. A sequence/control unit 14 selects the input terminal 11A-11N to be applied to an analog-to-digital converter 15. The output signal of the analog-to-digital converter 15 is applied to switch 16 under the control of the sequence/control unit 14. The configuration of the switch 16 determines into which of the buffer/registers 17A-17M the output signal of the analog-to-digital converter 15 is stored. In response to a signal from the sequence/control unit 14, an interrupt is provided to the central processing unit 18. In response to this interrupt signal, the central processing unit 18 retrieves the contents of a preselected one of the buffer/registers 17A-17M and compares the stored value in the buffer/register with a predetermined value stored in the central processing unit 18. When the comparison is positive, the central processing unit 18 generates an interrupt signal to respond to the identified condition and then continues the execution of the programmed procedures.
The foregoing procedure has several features that affect the efficiency of the program execution of the central processing unit 18. In particular, the necessity for interrupting the executing program of the central processing to determine whether an interrupt signal should be generated is typically wasted time when the condition to generate and interrupt signal are not present.
A need has therefore been felt for apparatus and an associated method having the feature of a comparison of a digitized signal with a predetermined value. It would be yet another feature of the apparatus and associated method for comparing a digitized signal with a predetermined value without the intervention of the central processing unit. It is yet another feature of the apparatus and associated method to generate an interrupt signal without disrupting the operation of the central processing unit.